// pages/recommend/index.js
Component({
  /**
   * 组件的属性列表
   */
  options:{
addGlobalClass:true
  },
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    list: null,
    personalized:null,
    newsong:null,
    indicatorDots: true,
    vertical: false,
    autoplay: true,
    circular: false,
    interval: 2000,
    duration: 500,
    previousMargin: 0,
    nextMargin: 0
  },

  /**
   * 组件的方法列表
   */
  
  methods: {
    showQuit(){
      wx.request({
        url: 'http://tea.hhp.im/banner',
        method:'GET',
        success:(res)=>{
          console.log(res.data);
let list=[...res.data.banners.map(item=>{
  return item
})]
this.setData({
  list:list
})
        }
      })
      wx.request({
        url: 'http://tea.hhp.im/personalized',
        method:'GET',
        success:(res)=>{

let personalized=[...res.data.result.map(item=>{
  return item
})]
this.setData({
  personalized:personalized
})
        }
      })
      wx.request({
        url: 'http://tea.hhp.im/personalized/newsong',
        method:'GET',
        success:(res)=>{

let newsong=[...res.data.result.map(item=>{
  return item
})]
this.setData({
  newsong:newsong
})
        }
      })
    }
  }
})
